package com.bdqn.controller;

import com.bdqn.LayUI.Layui;
import com.bdqn.Service.EnquireDetail.EnquireDetailService;
import com.bdqn.entity.EnquireDetail;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("/enquireDetail")
public class EnquireDetailController {
    @Autowired
    private EnquireDetailService enquireDetailService;

    @RequestMapping("/findAllEnqDe")
    @ResponseBody
    public Layui<EnquireDetail> findAll(){
        List<EnquireDetail> enquireDetails = enquireDetailService.findAllEnqDe();
        Layui<EnquireDetail> enquireDetailLayui = new Layui<>();
        enquireDetailLayui.setCode(0);
        enquireDetailLayui.setData(enquireDetails);
        return enquireDetailLayui;
    }
}
